package presentation;

import integration.UserDAORemote;

import javax.naming.*;
import javax.servlet.http.HttpSession;

import metier.UserBean;

public class Quitter implements Runnable {
	
	HttpSession session;

	public void setSession(HttpSession session) {
		this.session = session;
	}

	public void run(){
		HttpSession test;
		UserBean ub = (UserBean)session.getAttribute("ub");

		InitialContext context = new InitialContext();
		UserDAORemote uDAO = (UserDAORemote) context.lookup("dao/UserDAO");//dans renvoi UserDAOImpl

		uDAO.insert(ub);

	}
}
